/****************************************************************************

	COPYRIGHT(C) MAXSI SOFTWARE, JONAS 'SORTIE' TERMANSEN 2008, 2009, 2010, 2010

    This file is part of Maxsi Engine.

    Maxsi Engine is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Maxsi Engine is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with Maxsi Engine. If not, see <http://www.gnu.org/licenses/>.

	*/ #include "MaxsiEngineContributors.h" /*

	If you modify this file, please enter your name below and provide contact
	information in MaxsiEngineContributors.h. For more information please see
	MaxsiEngineContributors.h.
	
	Contributors to this file:

	- Jonas 'Sortie' Termansen
	- [your name here]

	MaxsiEngine.dll
	A linkable version of Maxsi Engine

	MaxsiMinGWHacks.h
	Hacks so MinGW can compile this correctly!

****************************************************************************/

#ifndef MaxsiMinGWHacks_H
#define MaxsiMinGWHacks_H
#ifdef __MINGW_H

#define Hack_BindIoCompletionCallback

#ifdef Hack_BindIoCompletionCallback
	typedef
	BOOL
	(WINAPI *LPBindIoCompletionCallback)(
		HANDLE FileHandle,
		LPOVERLAPPED_COMPLETION_ROUTINE Function,
		ULONG Flags
		);

	LINK BOOL BindIoCompletionCallback(HANDLE FileHandle, LPOVERLAPPED_COMPLETION_ROUTINE Function, ULONG Flags);
#endif

#ifndef PBS_MARQUEE
#define PBS_MARQUEE		0x08
#endif

#ifdef max
#undef max
#endif
#define max(a,b)            (((a) > (b)) ? (a) : (b))

#ifdef min
#undef min
#endif
#define min(a,b)            (((a) < (b)) ? (a) : (b))

#ifndef SIZE_MAX
#ifdef _WIN64 
#define SIZE_MAX ULONG_LONG_MAX
#else
#define SIZE_MAX ULONG_MAX
#endif
#endif

#endif
#endif